package day02.work01;

public class Truck extends Antomobile{
    private String bag;

 public Truck(){}
 public Truck(String brand,String plateNumber,String bag){
    super(brand,plateNumber);
    this.bag=bag;
}

 public String getBag() {
    return bag;
 }
 public void setBag(String bag) {
    this.bag = bag;
 }

//
public int getRent(int num){
    int k=0;
    switch (bag) {
        case "小型":
            k=300;
            break;
        case "中型":
            k=350;
            break;
        case "大型":
            k=500;
            break;                    
        default:
            break;
    }
    return k*num;
}

   
}
